<?php
use \GatewayWorker\Lib\Gateway;


class exitbattle extends cmdbase
{
	public function onCmd($msg){

		$group_mgr = $GLOBALS['GroupMgr'];

		//退出组
		if($group_mgr->leaveGroup($this->getCurClientId())){
			$msg_body = array(
            	'ret'=> NetErrorCode::$None,
            	"reason" => "success",
        	);
		}else{
			$msg_body = array(
            	'ret'=> NetErrorCode::$Error,
            	"reason" => "failed",
        	);
        }

 		return $msg_body;
	}
}